<template>

  <div class="mt-header">

    <ul class="el-menu el-menu--horizontal">
      <li :key="index"
      v-for="(item, index) in role.routes">
        <router-link  class="el-menu-item" :class="{ 'is-active': _.includes($route.name||'', item.name||'')}" :to="item.path">{{item.text}}</router-link>
      </li>
      <li style="float: right">
        <a class="el-menu-item">
          <slot name="username"></slot>
        </a>

      </li>

    </ul>

  </div>
</template>

<script>
  import {CONFIG} from '@/config/env'
  export default {
    data(){
     return {
       role:CONFIG.PROJECT.ROLE
     }
    }


  }
</script>

